package com.qingmeng.outsourcing.portal.enums;

import com.qingmeng.outsourcing.common.api.IErrorCode;

/**
 * 调用发送短信验证码过程中，可能会出现的结果
 */
public enum SMSResult implements IErrorCode {
    SEND_SMS_SUCCESS(0,"发送短信验证码成功"),
    SEND_SMS_FAILED(1,"发送短信验证码失败"),
    PHONE_ERROR(2,"电话号码格式错误"),
    PHONE_ALREADY_REGISTERED(3,"该手机号已经注册过该身份"),
    NETWORK_ERROR(4,"网络错误"),
    NO_LOGIN_NO_MODIFY_PHONE(5,"用户没有登录不能修改电话号码");

    private final long code;
    private final String message;

    SMSResult(long code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
